package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.common.vo.Result;
import com.itheima.service.SetMealService;
import org.springframework.web.bind.annotation.*;

//No provider available
@RestController
@RequestMapping("setMeal")
public class SetMealController {


    //redis  set结构  交集 并集 差值 set 不能重复

    @Reference(version = "1.0")
    private SetMealService setMealService;

    @PostMapping("getSetMeal")
    public Result getSetMeal(){
        return setMealService.findAll();
    }

    @PostMapping("findById")
    public Result findById(Integer id){
        return setMealService.findById(id);
    }

    @GetMapping("gen")
    public Result gen(){
        return setMealService.gen();
    }
}
